package com.huangwenshuo.futurestarschoolmanagement.mapper;

import com.huangwenshuo.futurestarschoolmanagement.pojo.dto.WorkDto;
import com.huangwenshuo.futurestarschoolmanagement.pojo.po.WorksPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huangwenshuo.futurestarschoolmanagement.pojo.vo.WorksVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huangwenshuo
 * @since 2021-03-06
 */
@Mapper
public interface WorksMapper extends BaseMapper<WorksPo> {

    void addWork(@Param("dto") WorkDto.AddWork addWork);

    void upaWork(@Param("dto")  WorkDto.AddWork addWork);

    List<WorksVo> getMyWorks(@Param("dto") WorkDto.GetWork getWork);

    Integer getMyWorksTotal(@Param("dto") WorkDto.GetWork getWork);

    List<WorksVo> getShowMyWorks(@Param("uid") Integer uid);

    void updateShow(@Param("uid")Integer uid, @Param("aid")Integer aid, @Param("show")Integer show);
}
